{include file='index@common/header'/}
<div class="row">
    <div class="col-md-3">
        <div class="panel panel-default">
            <div class="panel-heading">欢迎留言</div>
            <div class="panel-body">
                欢迎留言，请尽量填写能方便联系到您的联系方式，我们将尽快联系您！
            </div>
        </div>
    </div>
    <div class="col-md-9">
        <div class="panel panel-default">
            <div class="panel-body">
                <h1>
                    <div class="btn-group pull-right">
                        <a href="{:url('user/auth/login')}" class="btn btn-primary">用户登录</a>
                        <a href="{:url('user/auth/reg')}" class="btn btn-primary">会员注册</a>
                        <a href="{:url('user/auth/password')}" class="btn btn-primary">找回密码</a>
                    </div>
                    找回密码
                </h1>
                <hr>
                <div class="progress">
                  <div class="progress-bar progress-bar-success" style="width: 30%">
                    <span class="sr-only">50% Complete (success)</span>
                    第一步：输入邮箱
                  </div>
                  <div class="progress-bar progress-bar-success" style="width: 40%;">
                    <span class="sr-only">40% Complete (warning)</span>
                    第二步：进入邮箱 打开链接
                  </div>
                  <div class="progress-bar progress-bar-success" style="width: 30%;">
                    <span class="sr-only">20% Complete (warning)</span>
                    第三步：修改密码
                  </div>
                </div>
                <hr>
                <form class="form-horizontal well" id="re_password" method="post" onsubmit="return EBCMS.AUTH.password();" action="{:url('user/auth/password')}">
                    <div class="form-group">
                        <label for="password" class="col-sm-2 control-label">密码</label>
                        <div class="col-sm-10">
                            <input name="password" type="text" class="form-control" id="password">
                        </div>
                    </div>
                    <div class="form-group">
                        <label for="password2" class="col-sm-2 control-label">再次输入密码</label>
                        <div class="col-sm-10">
                            <input name="password2" type="text" class="form-control" id="password2">
                        </div>
                    </div>
                    {if condition="ebconfig('user.password_verify')==1"}
                        {include file='index@common/verify' /}
                    {/if}
                    <div class="form-group">
                        <div class="col-sm-offset-2 col-sm-10">
                            <button type="submit" class="btn btn-primary" >提交</button>
                        </div>
                    </div>
                    <script>
                        Namespace.register("EBCMS.AUTH");
                        $(function(){
                            EBCMS.AUTH.password = function(){
                                $.ajax({
                                    url: '{:url('user/auth/password')}',
                                    type: 'POST',
                                    dataType: 'json',
                                    data: $('#re_password').serialize(),
                                    success:function(data){
                                        if (data.code) {
                                            alert(data.msg);
                                            self.location=data.url;
                                        }else{
                                            alert(data.msg);
                                            EBCMS.FN.change_verify('#verify_img');
                                        }
                                    }
                                });
                                return false;
                            };
                        });
                    </script>
                </form>
            </div>
        </div>
    </div>
</div>
<include file='index@common/footer'/>